import React from 'react';
import { CartStyle } from './styledList';
import { string } from 'prop-types';
const Cart = (props) => {
    const { title, unit} = props;

    return (
        <CartStyle>
            <p className="title">
                {title}趋势 <span>({unit ? '单位：'+unit: ''})</span>
            </p>
            {props.children}
        </CartStyle>
    );
}

export default Cart;
Cart.propTypes = {
    title: string,
    unit:string
}

